﻿namespace Digitalmes.Application.Common.Strategies;

/// <summary>
/// 业务策略特性。
/// </summary>
/// <param name="name">策略名称</param>
/// <param name="order">执行顺序</param>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class StrategyAttribute(string name, int order) : Attribute
{
    /// <summary>
    /// 获取策略名称
    /// </summary>
    [NotNull]
    public string? Name { get; } = name;

    /// <summary>
    /// 获取执行顺序。
    /// </summary>
    public int Order { get; } = order;
}
